package com.example.managemyself.data.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

import com.example.managemyself.util.DateConverter;

import java.util.Date;

@Entity(tableName = "exercise_logs")
public class ExerciseLog {
    @PrimaryKey(autoGenerate = true)
    private int id;
    
    private Date date;
    private String exerciseType;    // 运动类型，如"跑步"、"游泳"等
    private int durationMinutes;    // 运动时长（分钟）
    private double distance;        // 运动距离（公里）
    private int caloriesBurned;     // 消耗卡路里
    private String location;        // 运动地点
    private String notes;           // 备注
    private int heartRateAvg;       // 平均心率
    private int heartRateMax;       // 最大心率
    private String intensity;       // 运动强度（如"低"、"中"、"高"）
    
    // 构造函数
    public ExerciseLog(Date date, String exerciseType, int durationMinutes) {
        this.date = date;
        this.exerciseType = exerciseType;
        this.durationMinutes = durationMinutes;
    }
    
    // Getters and Setters
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public Date getDate() {
        return date;
    }
    
    public void setDate(Date date) {
        this.date = date;
    }
    
    public String getExerciseType() {
        return exerciseType;
    }
    
    public void setExerciseType(String exerciseType) {
        this.exerciseType = exerciseType;
    }
    
    public int getDurationMinutes() {
        return durationMinutes;
    }
    
    public void setDurationMinutes(int durationMinutes) {
        this.durationMinutes = durationMinutes;
    }
    
    public double getDistance() {
        return distance;
    }
    
    public void setDistance(double distance) {
        this.distance = distance;
    }
    
    public int getCaloriesBurned() {
        return caloriesBurned;
    }
    
    public void setCaloriesBurned(int caloriesBurned) {
        this.caloriesBurned = caloriesBurned;
    }
    
    public String getLocation() {
        return location;
    }
    
    public void setLocation(String location) {
        this.location = location;
    }
    
    public String getNotes() {
        return notes;
    }
    
    public void setNotes(String notes) {
        this.notes = notes;
    }
    
    public int getHeartRateAvg() {
        return heartRateAvg;
    }
    
    public void setHeartRateAvg(int heartRateAvg) {
        this.heartRateAvg = heartRateAvg;
    }
    
    public int getHeartRateMax() {
        return heartRateMax;
    }
    
    public void setHeartRateMax(int heartRateMax) {
        this.heartRateMax = heartRateMax;
    }
    
    public String getIntensity() {
        return intensity;
    }
    
    public void setIntensity(String intensity) {
        this.intensity = intensity;
    }
}
